Optimal. Leaf size=147 \[ \frac {4 \sqrt {2} a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^{5/2} A \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{d}-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.53, antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.206, Rules used = {3594, 3600, 3480, 206, 3599, 63, 208} \[ -\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {4 \sqrt {2} a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^{5/2} A \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 206
Rule 208
Rule 3480
Rule 3594
Rule 3599
Rule 3600
Rubi steps
\begin {align*} \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \, dx &=\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac {2}{3} \int \cot (c+d x) (a+i a \tan (c+d x))^{3/2} \left (\frac {3 a A}{2}+\frac {3}{2} a (i A+2 B) \tan (c+d x)\right ) \, dx\\ &=-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac {4}{3} \int \cot (c+d x) \sqrt {a+i a \tan (c+d x)} \left (\frac {3 a^2 A}{4}+\frac {3}{4} a^2 (3 i A+4 B) \tan (c+d x)\right ) \, dx\\ &=-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}+(a A) \int \cot (c+d x) (a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)} \, dx+\left (4 a^2 (i A+B)\right ) \int \sqrt {a+i a \tan (c+d x)} \, dx\\ &=-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac {\left (a^3 A\right ) \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (8 a^3 (A-i B)\right ) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=\frac {4 \sqrt {2} a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}-\frac {\left (2 i a^2 A\right ) \operatorname {Subst}\left (\int \frac {1}{i-\frac {i x^2}{a}} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=-\frac {2 a^{5/2} A \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {4 \sqrt {2} a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^2 (A-2 i B) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a B (a+i a \tan (c+d x))^{3/2}}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 8.27, size = 429, normalized size = 2.92 \[ \frac {\cos ^3(c+d x) (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \left ((3 A-8 i B) \left (-\frac {2}{3} \cos (2 c)+\frac {2}{3} i \sin (2 c)\right )+\sec (c+d x) \left (-\frac {2}{3} B \sin (3 c+d x)-\frac {2}{3} i B \cos (3 c+d x)\right )\right )}{d (\cos (d x)+i \sin (d x))^2 (A \cos (c+d x)+B \sin (c+d x))}+\frac {e^{-2 i c} \sqrt {e^{i d x}} (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \left (8 (A-i B) \sinh ^{-1}\left (e^{i (c+d x)}\right )+\sqrt {2} A \left (\log \left (1-e^{i (c+d x)}\right )-\log \left (1+e^{i (c+d x)}\right )+\log \left (\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}-e^{i (c+d x)}+1\right )-\log \left (\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}+e^{i (c+d x)}+1\right )\right )\right )}{\sqrt {2} d \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \sec ^{\frac {7}{2}}(c+d x) (\cos (d x)+i \sin (d x))^{5/2} (A \cos (c+d x)+B \sin (c+d x))} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.50, size = 614, normalized size = 4.18 \[ -\frac {6 \, \sqrt {\frac {A^{2} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {16 \, {\left (3 \, A a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + A a^{3} + 2 \, \sqrt {2} \sqrt {\frac {A^{2} a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} + d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{A a}\right ) - 6 \, \sqrt {\frac {A^{2} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {16 \, {\left (3 \, A a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + A a^{3} - 2 \, \sqrt {2} \sqrt {\frac {A^{2} a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} + d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{A a}\right ) - 3 \, \sqrt {\frac {{\left (128 \, A^{2} - 256 i \, A B - 128 \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left ({\left (16 i \, A + 16 \, B\right )} a^{3} e^{\left (i \, d x + i \, c\right )} + \sqrt {2} \sqrt {\frac {{\left (128 \, A^{2} - 256 i \, A B - 128 \, B^{2}\right )} a^{5}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (4 i \, A + 4 \, B\right )} a^{2}}\right ) + 3 \, \sqrt {\frac {{\left (128 \, A^{2} - 256 i \, A B - 128 \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left ({\left (16 i \, A + 16 \, B\right )} a^{3} e^{\left (i \, d x + i \, c\right )} + \sqrt {2} \sqrt {\frac {{\left (128 \, A^{2} - 256 i \, A B - 128 \, B^{2}\right )} a^{5}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (4 i \, A + 4 \, B\right )} a^{2}}\right ) + 8 \, \sqrt {2} {\left ({\left (3 \, A - 8 i \, B\right )} a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} + 3 \, {\left (A - 2 i \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{12 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {5}{2}} \cot \left (d x + c\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 3.43, size = 965, normalized size = 6.56 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.98, size = 154, normalized size = 1.05 \[ -\frac {6 \, \sqrt {2} {\left (A - i \, B\right )} a^{\frac {5}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) - 3 \, A a^{\frac {5}{2}} \log \left (\frac {\sqrt {i \, a \tan \left (d x + c\right ) + a} - \sqrt {a}}{\sqrt {i \, a \tan \left (d x + c\right ) + a} + \sqrt {a}}\right ) - 2 i \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} B a + 6 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} {\left (A - 2 i \, B\right )} a^{2}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.97, size = 597, normalized size = 4.06 \[ -\left (\frac {2\,a^2\,\left (A+B\,1{}\mathrm {i}\right )}{d}-\frac {B\,a^2\,6{}\mathrm {i}}{d}\right )\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}+\frac {B\,a\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}\,2{}\mathrm {i}}{3\,d}-\frac {A\,\mathrm {atan}\left (\frac {A^3\,a^8\,d\,\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,224{}\mathrm {i}}{-224\,d\,A^3\,a^{11}+512{}\mathrm {i}\,d\,A^2\,B\,a^{11}+256\,d\,A\,B^2\,a^{11}}-\frac {A\,B^2\,a^8\,d\,\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,256{}\mathrm {i}}{-224\,d\,A^3\,a^{11}+512{}\mathrm {i}\,d\,A^2\,B\,a^{11}+256\,d\,A\,B^2\,a^{11}}+\frac {512\,A^2\,B\,a^8\,d\,\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{-224\,d\,A^3\,a^{11}+512{}\mathrm {i}\,d\,A^2\,B\,a^{11}+256\,d\,A\,B^2\,a^{11}}\right )\,\sqrt {a^5}\,2{}\mathrm {i}}{d}+\frac {\sqrt {2}\,\mathrm {atan}\left (\frac {224\,\sqrt {2}\,A^3\,a^8\,d\,\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{448\,d\,A^3\,a^{11}-1472{}\mathrm {i}\,d\,A^2\,B\,a^{11}-1536\,d\,A\,B^2\,a^{11}+512{}\mathrm {i}\,d\,B^3\,a^{11}}+\frac {\sqrt {2}\,B^3\,a^8\,d\,\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,256{}\mathrm {i}}{448\,d\,A^3\,a^{11}-1472{}\mathrm {i}\,d\,A^2\,B\,a^{11}-1536\,d\,A\,B^2\,a^{11}+512{}\mathrm {i}\,d\,B^3\,a^{11}}-\frac {768\,\sqrt {2}\,A\,B^2\,a^8\,d\,\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{448\,d\,A^3\,a^{11}-1472{}\mathrm {i}\,d\,A^2\,B\,a^{11}-1536\,d\,A\,B^2\,a^{11}+512{}\mathrm {i}\,d\,B^3\,a^{11}}-\frac {\sqrt {2}\,A^2\,B\,a^8\,d\,\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,736{}\mathrm {i}}{448\,d\,A^3\,a^{11}-1472{}\mathrm {i}\,d\,A^2\,B\,a^{11}-1536\,d\,A\,B^2\,a^{11}+512{}\mathrm {i}\,d\,B^3\,a^{11}}\right )\,\left (B+A\,1{}\mathrm {i}\right )\,\sqrt {-a^5}\,4{}\mathrm {i}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________